OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 void navigateTo(const std::string& url) | 82 void navigateTo(const std::string& url) |
83 { | 83 { |
84 FrameTestHelpers::loadFrame(webViewImpl()->mainFrame(), url); | 84 FrameTestHelpers::loadFrame(webViewImpl()->mainFrame(), url); |
85 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(
); | 85 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(
); |
86 } | 86 } |
87 | 87 |
88 void forceFullCompositingUpdate() | 88 void forceFullCompositingUpdate() |
89 { | 89 { |
| 90 webViewImpl()->layout(); |
90 RenderLayerCompositor* compositor = frame()->contentRenderer()->composit
or(); | 91 RenderLayerCompositor* compositor = frame()->contentRenderer()->composit
or(); |
91 compositor->updateCompositingLayers(); | 92 compositor->updateCompositingLayers(); |
92 } | 93 } |
93 | 94 |
94 void registerMockedHttpURLLoad(const std::string& fileName) | 95 void registerMockedHttpURLLoad(const std::string& fileName) |
95 { | 96 { |
96 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); | 97 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); |
97 } | 98 } |
98 | 99 |
99 WebLayer* getRootScrollLayer() | 100 WebLayer* getRootScrollLayer() |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) | 467 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) |
467 { | 468 { |
468 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); | 469 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); |
469 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); | 470 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); |
470 forceFullCompositingUpdate(); | 471 forceFullCompositingUpdate(); |
471 // This test document setup an iframe with scrollbars, then switch to | 472 // This test document setup an iframe with scrollbars, then switch to |
472 // an empty document by javascript. | 473 // an empty document by javascript. |
473 } | 474 } |
474 | 475 |
475 } // namespace | 476 } // namespace |
OLD | NEW |