Bug 1170488 - Add browser_multiple_pushState.js regression test. r=smaug
authorMike Conley <mconley@mozilla.com>
Tue, 16 Jun 2015 10:15:40 -0400
changeset 249541 8eb956e0ce98d86a9df7c8ef63177b532e75202e
parent 249540 53d80bc541e2f1829865807e3a3c6768942f4b82
child 249542 db0f91911578db121cd5d5e26ad13ccabb1f7a79
push id61281
push usermconley@mozilla.com
push dateThu, 18 Jun 2015 13:41:35 +0000
treeherdermozilla-inbound@8eb956e0ce98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1170488
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1170488 - Add browser_multiple_pushState.js regression test. r=smaug
docshell/test/browser/browser.ini
docshell/test/browser/browser_multiple_pushState.js
docshell/test/browser/file_multiple_pushState.html
--- a/docshell/test/browser/browser.ini
+++ b/docshell/test/browser/browser.ini
@@ -28,16 +28,17 @@ support-files =
   file_bug234628-9.html
   file_bug420605.html
   file_bug503832.html
   file_bug655270.html
   file_bug670318.html
   file_bug852909.pdf
   file_bug852909.png
   file_bug1046022.html
+  file_multiple_pushState.html
   print_postdata.sjs
   test-form_sjis.html
   timelineMarkers-04.html
   browser_timelineMarkers-frame-02.js
   browser_timelineMarkers-frame-03.js
   browser_timelineMarkers-frame-04.js
   browser_timelineMarkers-frame-05.js
   head.js
@@ -93,16 +94,17 @@ skip-if = e10s # Bug ?????? - test touch
 skip-if = e10s # Bug ?????? - event handler checks event.target is the content document and test e10s-utils doesn't do that.
 [browser_bug92473.js]
 skip-if = e10s # Bug ?????? - event handler checks event.target is the content document and test e10s-utils doesn't do that.
 [browser_uriFixupIntegration.js]
 [browser_loadDisallowInherit.js]
 skip-if = e10s
 [browser_loadURI.js]
 skip-if = e10s # Bug ?????? - event handler checks event.target is the content document and test e10s-utils doesn't do that.
+[browser_multiple_pushState.js]
 [browser_onbeforeunload_navigation.js]
 skip-if = e10s
 [browser_search_notification.js]
 [browser_timelineMarkers-01.js]
 [browser_timelineMarkers-02.js]
 [browser_timelineMarkers-03.js]
 [browser_timelineMarkers-04.js]
 [browser_timelineMarkers-05.js]
new file mode 100644
--- /dev/null
+++ b/docshell/test/browser/browser_multiple_pushState.js
@@ -0,0 +1,15 @@
+add_task(function* test_multiple_pushState() {
+  yield BrowserTestUtils.withNewTab({
+    gBrowser,
+    url: "http://example.org/browser/docshell/test/browser/file_multiple_pushState.html",
+  }, function* (browser) {
+    const kExpected = "http://example.org/bar/ABC/DEF?key=baz";
+
+    let contentLocation = yield ContentTask.spawn(browser, null, function* () {
+      return content.document.location.href;
+    });
+
+    is(contentLocation, kExpected);
+    is(browser.documentURI.spec, kExpected);
+  });
+});
new file mode 100644
--- /dev/null
+++ b/docshell/test/browser/file_multiple_pushState.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>Test multiple calls to history.pushState</title>
+  </head>
+  <body>
+    <h1>Ohai</h1>
+  </body>
+  <script type="text/javascript">
+    window.history.pushState({}, "", "/bar/ABC?key=baz");
+    window.history.pushState({}, "", "/bar/ABC/DEF?key=baz");
+  </script>
+</html>