OLD | NEW |
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 6540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6551 registerMockedHttpURLLoad("percent-height-descendants.html"); | 6551 registerMockedHttpURLLoad("percent-height-descendants.html"); |
6552 FrameTestHelpers::WebViewHelper webViewHelper; | 6552 FrameTestHelpers::WebViewHelper webViewHelper; |
6553 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); | 6553 webViewHelper.initializeAndLoad(m_baseURL + "percent-height-descendants.html
"); |
6554 | 6554 |
6555 WebView* webView = webViewHelper.webView(); | 6555 WebView* webView = webViewHelper.webView(); |
6556 webView->resize(WebSize(800, 800)); | 6556 webView->resize(WebSize(800, 800)); |
6557 webView->layout(); | 6557 webView->layout(); |
6558 | 6558 |
6559 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc
ument(); | 6559 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc
ument(); |
6560 RenderBlock* container = toRenderBlock(document->getElementById("container")
->renderer()); | 6560 RenderBlock* container = toRenderBlock(document->getElementById("container")
->renderer()); |
6561 RenderBox* percentHeightInAnonymous = toRenderBox(document->getElementById("
percent-height-in-anonymous")->renderer()); | 6561 LayoutBox* percentHeightInAnonymous = toLayoutBox(document->getElementById("
percent-height-in-anonymous")->renderer()); |
6562 RenderBox* percentHeightDirectChild = toRenderBox(document->getElementById("
percent-height-direct-child")->renderer()); | 6562 LayoutBox* percentHeightDirectChild = toLayoutBox(document->getElementById("
percent-height-direct-child")->renderer()); |
6563 | 6563 |
6564 EXPECT_TRUE(RenderBlock::hasPercentHeightDescendant(percentHeightInAnonymous
)); | 6564 EXPECT_TRUE(RenderBlock::hasPercentHeightDescendant(percentHeightInAnonymous
)); |
6565 EXPECT_TRUE(RenderBlock::hasPercentHeightDescendant(percentHeightDirectChild
)); | 6565 EXPECT_TRUE(RenderBlock::hasPercentHeightDescendant(percentHeightDirectChild
)); |
6566 | 6566 |
6567 ASSERT_TRUE(container->percentHeightDescendants()); | 6567 ASSERT_TRUE(container->percentHeightDescendants()); |
6568 ASSERT_TRUE(container->hasPercentHeightDescendants()); | 6568 ASSERT_TRUE(container->hasPercentHeightDescendants()); |
6569 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); | 6569 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); |
6570 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); | 6570 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); |
6571 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); | 6571 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); |
6572 | 6572 |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7215 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7215 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
7216 | 7216 |
7217 // Neither should a page reload. | 7217 // Neither should a page reload. |
7218 localFrame->reload(); | 7218 localFrame->reload(); |
7219 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 7219 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
7220 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 7220 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
7221 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7221 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
7222 } | 7222 } |
7223 | 7223 |
7224 } // namespace | 7224 } // namespace |
OLD | NEW |