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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElementTest.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLMediaElement.h" 5 #include "core/html/HTMLMediaElement.h"
6 6
7 #include "core/frame/Settings.h" 7 #include "core/frame/Settings.h"
8 #include "core/html/HTMLAudioElement.h" 8 #include "core/html/HTMLAudioElement.h"
9 #include "core/html/HTMLVideoElement.h" 9 #include "core/html/HTMLVideoElement.h"
10 #include "core/page/NetworkStateNotifier.h" 10 #include "core/page/NetworkStateNotifier.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return "ftp://example.com/foo.mp4"; 80 return "ftp://example.com/foo.mp4";
81 case TestURLScheme::kFile: 81 case TestURLScheme::kFile:
82 return "file:///foo/bar.mp4"; 82 return "file:///foo/bar.mp4";
83 case TestURLScheme::kData: 83 case TestURLScheme::kData:
84 return "data:video/mp4;base64,XXXXXXX"; 84 return "data:video/mp4;base64,XXXXXXX";
85 case TestURLScheme::kBlob: 85 case TestURLScheme::kBlob:
86 return "blob:http://example.com/00000000-0000-0000-0000-000000000000"; 86 return "blob:http://example.com/00000000-0000-0000-0000-000000000000";
87 default: 87 default:
88 NOTREACHED(); 88 NOTREACHED();
89 } 89 }
90 return emptyString(); 90 return emptyString;
91 } 91 }
92 92
93 TEST_P(HTMLMediaElementTest, preloadType) { 93 TEST_P(HTMLMediaElementTest, preloadType) {
94 struct TestData { 94 struct TestData {
95 bool dataSaverEnabled; 95 bool dataSaverEnabled;
96 bool forcePreloadNoneForMediaElements; 96 bool forcePreloadNoneForMediaElements;
97 bool isCellular; 97 bool isCellular;
98 TestURLScheme srcScheme; 98 TestURLScheme srcScheme;
99 AtomicString preloadToSet; 99 AtomicString preloadToSet;
100 AtomicString preloadExpected; 100 AtomicString preloadExpected;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 setCurrentSrc(srcSchemeToURL(data.srcScheme)); 132 setCurrentSrc(srcSchemeToURL(data.srcScheme));
133 media()->setPreload(data.preloadToSet); 133 media()->setPreload(data.preloadToSet);
134 134
135 EXPECT_EQ(data.preloadExpected, media()->preload()) 135 EXPECT_EQ(data.preloadExpected, media()->preload())
136 << "preload type differs at index" << index; 136 << "preload type differs at index" << index;
137 ++index; 137 ++index;
138 } 138 }
139 } 139 }
140 140
141 } // namespace blink 141 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/TextControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698