Index: third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
index 667b09874c808cb497a15fa91243c7cb09cf6313..ece0e76276c90ae945aeaa84266377611880d183 100644 |
--- a/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp |
@@ -631,11 +631,7 @@ TEST_F(FrameThrottlingTest, ThrottledTopLevelEventHandlerIgnored) |
loadURL("https://example.com/"); |
mainResource.complete("<iframe id=frame sandbox=allow-scripts src=iframe.html></iframe>"); |
- frameResource.complete( |
- "<script>" |
- "window.addEventListener('touchstart', function(){});" |
- "document.addEventListener('touchstart', function(){});" |
- "</script>"); |
+ frameResource.complete("<body style='touch-action: none'></body>"); |
Rick Byers
2016/07/07 20:02:09
Is using touch-action really better than explicit
dtapuska
2016/07/07 20:34:22
I was trying to future proof it if we move the pas
Rick Byers
2016/07/07 20:45:01
Ah, I see. I think we'll have to think harder abo
|
auto* frameElement = toHTMLIFrameElement(document().getElementById("frame")); |
frameElement->setAttribute(styleAttr, "transform: translateY(480px)"); |
compositeFrame(); // Throttle the frame. |
@@ -644,9 +640,7 @@ TEST_F(FrameThrottlingTest, ThrottledTopLevelEventHandlerIgnored) |
// The touch handlers in the throttled frame should have been ignored. |
EXPECT_EQ(0u, touchHandlerRegionSize()); |
- // Unthrottling the frame makes the touch handlers active again. Note that |
- // both handlers get combined into the same rectangle in the region, so |
- // there is only one rectangle in total. |
+ // Unthrottling the frame makes the touch handlers active again. |
frameElement->setAttribute(styleAttr, "transform: translateY(0px)"); |
compositeFrame(); // Unthrottle the frame. |
compositeFrame(); // Update touch handler regions. |