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 5385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5396 TEST_F(WebFrameTest, HasVisibleContentOnHiddenFrames) | 5396 TEST_F(WebFrameTest, HasVisibleContentOnHiddenFrames) |
5397 { | 5397 { |
5398 registerMockedHttpURLLoad("hidden_frames.html"); | 5398 registerMockedHttpURLLoad("hidden_frames.html"); |
5399 FrameTestHelpers::WebViewHelper webViewHelper; | 5399 FrameTestHelpers::WebViewHelper webViewHelper; |
5400 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "hidd
en_frames.html"); | 5400 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "hidd
en_frames.html"); |
5401 for (WebFrame* frame = webViewImpl->mainFrameImpl()->traverseNext(false); fr
ame; frame = frame->traverseNext(false)) { | 5401 for (WebFrame* frame = webViewImpl->mainFrameImpl()->traverseNext(false); fr
ame; frame = frame->traverseNext(false)) { |
5402 EXPECT_FALSE(frame->hasVisibleContent()); | 5402 EXPECT_FALSE(frame->hasVisibleContent()); |
5403 } | 5403 } |
5404 } | 5404 } |
5405 | 5405 |
| 5406 class ManifestChangeWebFrameClient : public FrameTestHelpers::TestWebFrameClient
{ |
| 5407 public: |
| 5408 ManifestChangeWebFrameClient() : m_manifestChangeCount(0) { } |
| 5409 virtual void didChangeManifest(WebLocalFrame*) OVERRIDE |
| 5410 { |
| 5411 ++m_manifestChangeCount; |
| 5412 } |
| 5413 |
| 5414 int manifestChangeCount() { return m_manifestChangeCount; } |
| 5415 |
| 5416 private: |
| 5417 int m_manifestChangeCount; |
| 5418 }; |
| 5419 |
| 5420 TEST_F(WebFrameTest, NotifyManifestChange) |
| 5421 { |
| 5422 registerMockedHttpURLLoad("link-manifest-change.html"); |
| 5423 |
| 5424 ManifestChangeWebFrameClient webFrameClient; |
| 5425 FrameTestHelpers::WebViewHelper webViewHelper; |
| 5426 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", tru
e, &webFrameClient); |
| 5427 |
| 5428 EXPECT_EQ(14, webFrameClient.manifestChangeCount()); |
| 5429 } |
| 5430 |
5406 } // namespace | 5431 } // namespace |
OLD | NEW |