OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 const int kfakeTouchId = 7; | 103 const int kfakeTouchId = 7; |
104 | 104 |
105 class TouchActionTest : public testing::Test { | 105 class TouchActionTest : public testing::Test { |
106 public: | 106 public: |
107 TouchActionTest() | 107 TouchActionTest() |
108 : m_baseURL("http://www.test.com/") | 108 : m_baseURL("http://www.test.com/") |
109 { | 109 { |
110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL), "touch-action-tests.css"); | 110 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL), "touch-action-tests.css"); |
111 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL), "touch-action-tests.js"); | 111 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL), "touch-action-tests.js"); |
112 blink::RuntimeEnabledFeatures::setCSSTouchActionEnabled(true); | |
113 } | 112 } |
114 | 113 |
115 virtual void TearDown() | 114 virtual void TearDown() |
116 { | 115 { |
117 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); | 116 Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); |
118 } | 117 } |
119 | 118 |
120 protected: | 119 protected: |
121 void runTouchActionTest(std::string file); | 120 void runTouchActionTest(std::string file); |
122 void runShadowDOMTest(std::string file); | 121 void runShadowDOMTest(std::string file); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 { | 342 { |
344 runShadowDOMTest("touch-action-shadow-dom.html"); | 343 runShadowDOMTest("touch-action-shadow-dom.html"); |
345 } | 344 } |
346 | 345 |
347 TEST_F(TouchActionTest, Pan) | 346 TEST_F(TouchActionTest, Pan) |
348 { | 347 { |
349 runTouchActionTest("touch-action-pan.html"); | 348 runTouchActionTest("touch-action-pan.html"); |
350 } | 349 } |
351 | 350 |
352 } | 351 } |
OLD | NEW |