| 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 8490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8501 EXPECT_FALSE(anonymous_block->HasPercentHeightDescendants()); | 8501 EXPECT_FALSE(anonymous_block->HasPercentHeightDescendants()); |
| 8502 } | 8502 } |
| 8503 | 8503 |
| 8504 TEST_P(ParameterizedWebFrameTest, HasVisibleContentOnVisibleFrames) { | 8504 TEST_P(ParameterizedWebFrameTest, HasVisibleContentOnVisibleFrames) { |
| 8505 RegisterMockedHttpURLLoad("visible_frames.html"); | 8505 RegisterMockedHttpURLLoad("visible_frames.html"); |
| 8506 FrameTestHelpers::WebViewHelper web_view_helper; | 8506 FrameTestHelpers::WebViewHelper web_view_helper; |
| 8507 WebViewBase* web_view_impl = | 8507 WebViewBase* web_view_impl = |
| 8508 web_view_helper.InitializeAndLoad(base_url_ + "visible_frames.html"); | 8508 web_view_helper.InitializeAndLoad(base_url_ + "visible_frames.html"); |
| 8509 for (WebFrame* frame = web_view_impl->MainFrameImpl()->TraverseNext(); frame; | 8509 for (WebFrame* frame = web_view_impl->MainFrameImpl()->TraverseNext(); frame; |
| 8510 frame = frame->TraverseNext()) { | 8510 frame = frame->TraverseNext()) { |
| 8511 EXPECT_TRUE(frame->HasVisibleContent()); | 8511 EXPECT_TRUE(frame->ToWebLocalFrame()->HasVisibleContent()); |
| 8512 } | 8512 } |
| 8513 } | 8513 } |
| 8514 | 8514 |
| 8515 TEST_P(ParameterizedWebFrameTest, HasVisibleContentOnHiddenFrames) { | 8515 TEST_P(ParameterizedWebFrameTest, HasVisibleContentOnHiddenFrames) { |
| 8516 RegisterMockedHttpURLLoad("hidden_frames.html"); | 8516 RegisterMockedHttpURLLoad("hidden_frames.html"); |
| 8517 FrameTestHelpers::WebViewHelper web_view_helper; | 8517 FrameTestHelpers::WebViewHelper web_view_helper; |
| 8518 WebViewBase* web_view_impl = | 8518 WebViewBase* web_view_impl = |
| 8519 web_view_helper.InitializeAndLoad(base_url_ + "hidden_frames.html"); | 8519 web_view_helper.InitializeAndLoad(base_url_ + "hidden_frames.html"); |
| 8520 for (WebFrame* frame = web_view_impl->MainFrameImpl()->TraverseNext(); frame; | 8520 for (WebFrame* frame = web_view_impl->MainFrameImpl()->TraverseNext(); frame; |
| 8521 frame = frame->TraverseNext()) { | 8521 frame = frame->TraverseNext()) { |
| 8522 EXPECT_FALSE(frame->HasVisibleContent()); | 8522 EXPECT_FALSE(frame->ToWebLocalFrame()->HasVisibleContent()); |
| 8523 } | 8523 } |
| 8524 } | 8524 } |
| 8525 | 8525 |
| 8526 class ManifestChangeWebFrameClient | 8526 class ManifestChangeWebFrameClient |
| 8527 : public FrameTestHelpers::TestWebFrameClient { | 8527 : public FrameTestHelpers::TestWebFrameClient { |
| 8528 public: | 8528 public: |
| 8529 ManifestChangeWebFrameClient() : manifest_change_count_(0) {} | 8529 ManifestChangeWebFrameClient() : manifest_change_count_(0) {} |
| 8530 void DidChangeManifest() override { ++manifest_change_count_; } | 8530 void DidChangeManifest() override { ++manifest_change_count_; } |
| 8531 | 8531 |
| 8532 int ManifestChangeCount() { return manifest_change_count_; } | 8532 int ManifestChangeCount() { return manifest_change_count_; } |
| (...skipping 3467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12000 if (obj->IsText()) { | 12000 if (obj->IsText()) { |
| 12001 LayoutText* layout_text = ToLayoutText(obj); | 12001 LayoutText* layout_text = ToLayoutText(obj); |
| 12002 text = layout_text->GetText(); | 12002 text = layout_text->GetText(); |
| 12003 break; | 12003 break; |
| 12004 } | 12004 } |
| 12005 } | 12005 } |
| 12006 EXPECT_EQ("foo alt", text.Utf8()); | 12006 EXPECT_EQ("foo alt", text.Utf8()); |
| 12007 } | 12007 } |
| 12008 | 12008 |
| 12009 } // namespace blink | 12009 } // namespace blink |
| OLD | NEW |