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

Unified Diff: LayoutTests/screen_orientation/page-visibility.html

Issue 319633007: Move WebScreenOrientationClient to WebFrameClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: m_client null check Created 6 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 | Source/modules/screen_orientation/ScreenOrientation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/screen_orientation/page-visibility.html
diff --git a/LayoutTests/screen_orientation/page-visibility.html b/LayoutTests/screen_orientation/page-visibility.html
index 874988d69d766da069d8168dfaf7a694998f35d6..8a1517d6ba6be0f22291009cc1a90b9c91eae176 100644
--- a/LayoutTests/screen_orientation/page-visibility.html
+++ b/LayoutTests/screen_orientation/page-visibility.html
@@ -3,13 +3,19 @@
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
+<iframe src='about:blank'></iframe>
<script>
var orientationChangeEventListenerCalls = 0;
+var orientationChangeEventListenerCallsForFrame = 0;
window.addEventListener('orientationchange', function() {
orientationChangeEventListenerCalls++;
});
+window.frames[0].addEventListener('orientationchange', function() {
+ orientationChangeEventListenerCallsForFrame++;
+});
+
test(function() {
assert_false(document.hidden);
if (window.testRunner)
@@ -42,6 +48,11 @@ test(function() {
// Should keep returning the start returning the orientation value.
assert_equals(screen.orientation, "portrait-primary");
}, "Test that screen.orientation is updated once the page is visible again");
+
+test(function() {
+ assert_equals(orientationChangeEventListenerCallsForFrame, orientationChangeEventListenerCalls);
+}, "Test that the iframe got as many events as the main frame.")
+
</script>
</body>
</html>
« no previous file with comments | « no previous file | Source/modules/screen_orientation/ScreenOrientation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698