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 10863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10874 MultipleDataChunkDelegate delegate; | 10874 MultipleDataChunkDelegate delegate; |
10875 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(&delegate); | 10875 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(&delegate); |
10876 FrameTestHelpers::WebViewHelper helper; | 10876 FrameTestHelpers::WebViewHelper helper; |
10877 helper.InitializeAndLoad(url, true); | 10877 helper.InitializeAndLoad(url, true); |
10878 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(nullptr); | 10878 Platform::Current()->GetURLLoaderMockFactory()->SetLoaderDelegate(nullptr); |
10879 | 10879 |
10880 Document* document = | 10880 Document* document = |
10881 ToLocalFrame(helper.WebView()->GetPage()->MainFrame())->GetDocument(); | 10881 ToLocalFrame(helper.WebView()->GetPage()->MainFrame())->GetDocument(); |
10882 EXPECT_TRUE(document->IsImageDocument()); | 10882 EXPECT_TRUE(document->IsImageDocument()); |
10883 EXPECT_EQ(ResourceStatus::kDecodeError, | 10883 EXPECT_EQ(ResourceStatus::kDecodeError, |
10884 ToImageDocument(document)->CachedImage()->GetStatus()); | 10884 ToImageDocument(document)->CachedImage()->GetContentStatus()); |
10885 } | 10885 } |
10886 | 10886 |
10887 // Ensure that the root layer -- whose size is ordinarily derived from the | 10887 // Ensure that the root layer -- whose size is ordinarily derived from the |
10888 // content size -- maintains a minimum height matching the viewport in cases | 10888 // content size -- maintains a minimum height matching the viewport in cases |
10889 // where the content is smaller. | 10889 // where the content is smaller. |
10890 TEST_F(WebFrameTest, RootLayerMinimumHeight) { | 10890 TEST_F(WebFrameTest, RootLayerMinimumHeight) { |
10891 constexpr int kViewportWidth = 320; | 10891 constexpr int kViewportWidth = 320; |
10892 constexpr int kViewportHeight = 640; | 10892 constexpr int kViewportHeight = 640; |
10893 constexpr int kBrowserControlsHeight = 100; | 10893 constexpr int kBrowserControlsHeight = 100; |
10894 | 10894 |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12037 | 12037 |
12038 // Failing the original child frame navigation and trying to render fallback | 12038 // Failing the original child frame navigation and trying to render fallback |
12039 // content shouldn't crash. It should return NoLoadInProgress. This is so the | 12039 // content shouldn't crash. It should return NoLoadInProgress. This is so the |
12040 // caller won't attempt to replace the correctly empty frame with an error | 12040 // caller won't attempt to replace the correctly empty frame with an error |
12041 // page. | 12041 // page. |
12042 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, | 12042 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, |
12043 child->MaybeRenderFallbackContent(WebURLError())); | 12043 child->MaybeRenderFallbackContent(WebURLError())); |
12044 } | 12044 } |
12045 | 12045 |
12046 } // namespace blink | 12046 } // namespace blink |
OLD | NEW |