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 6683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6694 | 6694 |
6695 WebView* webView = webViewHelper.webView(); | 6695 WebView* webView = webViewHelper.webView(); |
6696 webView->resize(WebSize(800, 800)); | 6696 webView->resize(WebSize(800, 800)); |
6697 webView->updateAllLifecyclePhases(); | 6697 webView->updateAllLifecyclePhases(); |
6698 | 6698 |
6699 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc
ument(); | 6699 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc
ument(); |
6700 LayoutBlock* container = toLayoutBlock(document->getElementById("container")
->layoutObject()); | 6700 LayoutBlock* container = toLayoutBlock(document->getElementById("container")
->layoutObject()); |
6701 LayoutBox* percentHeightInAnonymous = toLayoutBox(document->getElementById("
percent-height-in-anonymous")->layoutObject()); | 6701 LayoutBox* percentHeightInAnonymous = toLayoutBox(document->getElementById("
percent-height-in-anonymous")->layoutObject()); |
6702 LayoutBox* percentHeightDirectChild = toLayoutBox(document->getElementById("
percent-height-direct-child")->layoutObject()); | 6702 LayoutBox* percentHeightDirectChild = toLayoutBox(document->getElementById("
percent-height-direct-child")->layoutObject()); |
6703 | 6703 |
6704 EXPECT_TRUE(LayoutBlock::hasPercentHeightDescendant(percentHeightInAnonymous
)); | 6704 EXPECT_TRUE(container->hasPercentHeightDescendant(percentHeightInAnonymous))
; |
6705 EXPECT_TRUE(LayoutBlock::hasPercentHeightDescendant(percentHeightDirectChild
)); | 6705 EXPECT_TRUE(container->hasPercentHeightDescendant(percentHeightDirectChild))
; |
6706 | 6706 |
6707 ASSERT_TRUE(container->percentHeightDescendants()); | 6707 ASSERT_TRUE(container->percentHeightDescendants()); |
6708 ASSERT_TRUE(container->hasPercentHeightDescendants()); | 6708 ASSERT_TRUE(container->hasPercentHeightDescendants()); |
6709 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); | 6709 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); |
6710 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); | 6710 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); |
6711 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); | 6711 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); |
6712 | 6712 |
6713 LayoutBlock* anonymousBlock = percentHeightInAnonymous->containingBlock(); | 6713 LayoutBlock* anonymousBlock = percentHeightInAnonymous->containingBlock(); |
6714 EXPECT_TRUE(anonymousBlock->isAnonymous()); | 6714 EXPECT_TRUE(anonymousBlock->isAnonymous()); |
6715 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); | 6715 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8351 | 8351 |
8352 TEST_F(WebFrameTest, CallbackOrdering) | 8352 TEST_F(WebFrameTest, CallbackOrdering) |
8353 { | 8353 { |
8354 registerMockedHttpURLLoad("foo.html"); | 8354 registerMockedHttpURLLoad("foo.html"); |
8355 FrameTestHelpers::WebViewHelper webViewHelper; | 8355 FrameTestHelpers::WebViewHelper webViewHelper; |
8356 CallbackOrderingWebFrameClient client; | 8356 CallbackOrderingWebFrameClient client; |
8357 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client); | 8357 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client); |
8358 } | 8358 } |
8359 | 8359 |
8360 } // namespace blink | 8360 } // namespace blink |
OLD | NEW |