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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 RenderLayerCompositor* innerCompositor = innerRenderView->compositor(); | 454 RenderLayerCompositor* innerCompositor = innerRenderView->compositor(); |
455 ASSERT_TRUE(innerCompositor->inCompositingMode()); | 455 ASSERT_TRUE(innerCompositor->inCompositingMode()); |
456 ASSERT_TRUE(innerCompositor->scrollLayer()); | 456 ASSERT_TRUE(innerCompositor->scrollLayer()); |
457 | 457 |
458 GraphicsLayer* scrollLayer = innerCompositor->scrollLayer(); | 458 GraphicsLayer* scrollLayer = innerCompositor->scrollLayer(); |
459 ASSERT_EQ(innerFrameView, scrollLayer->scrollableArea()); | 459 ASSERT_EQ(innerFrameView, scrollLayer->scrollableArea()); |
460 | 460 |
461 WebLayer* webScrollLayer = scrollLayer->platformLayer(); | 461 WebLayer* webScrollLayer = scrollLayer->platformLayer(); |
462 ASSERT_TRUE(webScrollLayer->scrollable()); | 462 ASSERT_TRUE(webScrollLayer->scrollable()); |
463 | 463 |
464 int expectedScrollPosition = 958 + (innerFrameView->verticalScrollbar()->isO verlayScrollbar() ? 0 : 15); | 464 int expectedScrollPosition = 958 + (innerFrameView->verticalScrollbar()->isO verlayScrollbar() ? 0 : 15); |
Rick Byers
2014/10/04 00:04:25
again, let's use a non-integer value
Yufeng Shen (Slow to review)
2014/10/06 17:54:58
hmm, not sure about this one. This test is testing
Rick Byers
2014/10/06 21:11:30
Ah, I hadn't looked that deeply. Looks fine - tha
| |
465 ASSERT_EQ(expectedScrollPosition, webScrollLayer->scrollPosition().x); | 465 ASSERT_EQ(expectedScrollPosition, webScrollLayer->scrollPositionDouble().x); |
466 } | 466 } |
467 | 467 |
468 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) | 468 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) |
469 { | 469 { |
470 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); | 470 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); |
471 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); | 471 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); |
472 forceFullCompositingUpdate(); | 472 forceFullCompositingUpdate(); |
473 // This test document setup an iframe with scrollbars, then switch to | 473 // This test document setup an iframe with scrollbars, then switch to |
474 // an empty document by javascript. | 474 // an empty document by javascript. |
475 } | 475 } |
476 | 476 |
477 } // namespace | 477 } // namespace |
OLD | NEW |