Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2746343002: Phase III Step 1: Make ImageResourceContent manage its own ResourceStatus (Closed)
Patch Set: Reflect comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698