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

Unified Diff: LayoutTests/fast/loader/navigation-scheduler-user-gesture.html

Issue 14732009: Make NavigationScheduler correctly track user gestures. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/fast/loader/navigation-scheduler-user-gesture-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/loader/navigation-scheduler-user-gesture.html
diff --git a/LayoutTests/fast/loader/navigation-scheduler-user-gesture.html b/LayoutTests/fast/loader/navigation-scheduler-user-gesture.html
new file mode 100644
index 0000000000000000000000000000000000000000..81cc7d332f4c5836cd4e72c8b1874a3a8e17949d
--- /dev/null
+++ b/LayoutTests/fast/loader/navigation-scheduler-user-gesture.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../js/resources/js-test-pre.js"></script>
+<a href='about:blank' target='_blank'></a>
+<button>click me</button>
+<script>
+ description('Check that the NavigationScheduler correctly tracks user gestures');
+ if (window.testRunner) {
+ testRunner.setCanOpenWindows();
+ testRunner.setPopupBlockingEnabled(true);
+ }
+
+ function popup() {
+ // Previously, this made the NavigationController create an additional
+ // user gesture.
+ window.open('javascript:', '_self', '');
+ // Consume one gesture.
+ window.open('about:blank').close();
+ shouldBeUndefined("window.open('about:blank')");
+ }
+
+ var button = document.querySelector('button');
+ button.onclick = popup;
+
+ if (window.testRunner) {
+ eventSender.mouseMoveTo(button.offsetLeft + 2, button.offsetTop + 2);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+</script>
+<script src="../js/resources/js-test-post.js"></script>
« no previous file with comments | « no previous file | LayoutTests/fast/loader/navigation-scheduler-user-gesture-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698