location.hash = '' should always result in an empty fragment, not no-fragment

So far in |setHash|, old fragment identifier and new fragment identifier are
compared ignoring nullity.

When fragment has never been set, |old_fragment_identifier| is null.
In this situation, |location.hash = ''| is called,
|new_fragment_identifier| is not null empty value.
|EqualIgnoringNullity| treats these as the same, |setHash| does nothing.

So, this patch compare old and new fragment by == operator
not |EqualIgnoringNullity|.

Bug: 615300
Change-Id: Id509bc5066eeee83236ecb4ee816ecb90540a260
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647298
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670795}
diff --git a/html/browsers/history/the-location-interface/location_hash.html b/html/browsers/history/the-location-interface/location_hash.html
index 74d2d01..99f64dd 100644
--- a/html/browsers/history/the-location-interface/location_hash.html
+++ b/html/browsers/history/the-location-interface/location_hash.html
@@ -23,6 +23,8 @@
       var frameWin = document.getElementById("srcdoc-iframe").contentWindow;
       assert_equals(frameWin.location.href, "about:srcdoc");
       assert_equals(frameWin.scrollY, 0, "Should not have scrolled yet");
+      frameWin.location.hash = "";
+      assert_equals(frameWin.location.href, "about:srcdoc#", "Setting an empty hash should result in an empty fragment, not no fragment.");
       frameWin.location.hash = "test";
       assert_equals(frameWin.location.href, "about:srcdoc#test");
       assert_true(frameWin.scrollY > frameWin.innerHeight,