Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: LayoutTests/http/tests/navigation/navigate-during-commit.html

Issue 1164883002: Ignore attempts to navigate once a provisional commit has gotten too far along. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/navigation/resources/navigate-during-commit-iframe.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/navigation/navigate-during-commit.html
diff --git a/LayoutTests/http/tests/navigation/navigate-during-commit.html b/LayoutTests/http/tests/navigation/navigate-during-commit.html
new file mode 100644
index 0000000000000000000000000000000000000000..8fea992fca205a266d5cc5d75b7ad57b0e225747
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/navigate-during-commit.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<body>
+<script>
+
+// The test involves navigating so we use a iframe for the navigation to
+// simplify testharness usage in the main page.
+function conduct_test(frame) {
+ return new Promise(function(resolve, reject) {
+ var IFRAME_SRC = "resources/navigate-during-commit-iframe.html"
+ var onload_count = 0;
+ var frame = document.createElement('iframe');
+ frame.onload = function () {
+ if (++onload_count == 2) {
+ var success = window[0].location == "about:blank";
+ document.body.removeChild(frame);
+ if (success)
+ resolve();
+ else
+ reject();
+ }
+ };
+ frame.src = IFRAME_SRC;
+ document.body.appendChild(frame);
+ });
+}
+
+async_test(function(t) {
+ var step = t.step_func.bind(t);
+ conduct_test()
+ .then(step(function() { t.done(); }),
+ step(function() { assert_true(false, "promised rejected"); }))
+ .catch(step(function() { assert_true(false, "caught exception"); }));
+ }, 'navigate-during-commit');
+
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/http/tests/navigation/resources/navigate-during-commit-iframe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698