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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing sourceDevice initialization in EventSender. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100 1595 IntPoint hitPoint = IntPoint(30, 30); // button size is 100x100
1596 1596
1597 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webViewHelper.webView()->main Frame()); 1597 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webViewHelper.webView()->main Frame());
1598 Document* document = frame->frame()->document(); 1598 Document* document = frame->frame()->document();
1599 Element* element = document->getElementById("tap_button"); 1599 Element* element = document->getElementById("tap_button");
1600 1600
1601 ASSERT_NE(nullptr, element); 1601 ASSERT_NE(nullptr, element);
1602 EXPECT_EQ(String("oldValue"), element->innerText()); 1602 EXPECT_EQ(String("oldValue"), element->innerText());
1603 1603
1604 PlatformGestureEvent gestureEvent(PlatformEvent::Type::GestureTap, hitPoint, hitPoint, IntSize(0, 0), 0, PlatformEvent::NoModifiers); 1604 PlatformGestureEvent gestureEvent(PlatformEvent::Type::GestureTap, hitPoint, hitPoint, IntSize(0, 0), 0, PlatformEvent::NoModifiers, PlatformGestureSourceUn initialized);
tdresser 2015/10/14 15:14:20 Let's not use uninitialized.
wjmaclean 2015/10/14 15:55:09 Done.
1605 webViewHelper.webViewImpl()->mainFrameImpl()->frame()->eventHandler().handle GestureEvent(gestureEvent); 1605 webViewHelper.webViewImpl()->mainFrameImpl()->frame()->eventHandler().handle GestureEvent(gestureEvent);
1606 // when pressed, the button changes its own text to "updatedValue" 1606 // when pressed, the button changes its own text to "updatedValue"
1607 EXPECT_EQ(String("updatedValue"), element->innerText()); 1607 EXPECT_EQ(String("updatedValue"), element->innerText());
1608 } 1608 }
1609 1609
1610 TEST_P(ParameterizedWebFrameTest, SetForceZeroLayoutHeightWorksAcrossNavigations ) 1610 TEST_P(ParameterizedWebFrameTest, SetForceZeroLayoutHeightWorksAcrossNavigations )
1611 { 1611 {
1612 UseMockScrollbarSettings mockScrollbarSettings; 1612 UseMockScrollbarSettings mockScrollbarSettings;
1613 registerMockedHttpURLLoad("200-by-300.html"); 1613 registerMockedHttpURLLoad("200-by-300.html");
1614 registerMockedHttpURLLoad("large-div.html"); 1614 registerMockedHttpURLLoad("large-div.html");
(...skipping 6635 matching lines...) Expand 10 before | Expand all | Expand 10 after
8250 EXPECT_TRUE(resource); 8250 EXPECT_TRUE(resource);
8251 EXPECT_NE(0, resource->loadFinishTime()); 8251 EXPECT_NE(0, resource->loadFinishTime());
8252 8252
8253 DocumentLoader* loader = document->loader(); 8253 DocumentLoader* loader = document->loader();
8254 8254
8255 EXPECT_TRUE(loader); 8255 EXPECT_TRUE(loader);
8256 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime()); 8256 EXPECT_EQ(loader->timing().responseEnd(), resource->loadFinishTime());
8257 } 8257 }
8258 8258
8259 } // namespace blink 8259 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698