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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2389753002: doc.write blocking intervention warning header (Closed)
Patch Set: Feedback incorporated Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 Resource* resource = document->fetcher()->allResources().get( 426 Resource* resource = document->fetcher()->allResources().get(
427 URLTestHelpers::toKURL(url.utf8().data())); 427 URLTestHelpers::toKURL(url.utf8().data()));
428 428
429 if (!resource) 429 if (!resource)
430 return ResourceLoadPriority::ResourceLoadPriorityUnresolved; 430 return ResourceLoadPriority::ResourceLoadPriorityUnresolved;
431 431
432 return resource->resourceRequest().priority(); 432 return resource->resourceRequest().priority();
433 } 433 }
434 434
435 String Internals::getResourceHeader(const String& url,
436 const String& header,
437 Document* document) {
438 if (!document)
439 return String();
440 Resource* resource = document->fetcher()->allResources().get(
441 URLTestHelpers::toKURL(url.utf8().data()));
442 if (!resource)
443 return String();
444 return resource->resourceRequest().httpHeaderField(header.utf8().data());
445 }
446
435 bool Internals::isSharingStyle(Element* element1, Element* element2) const { 447 bool Internals::isSharingStyle(Element* element1, Element* element2) const {
436 ASSERT(element1 && element2); 448 ASSERT(element1 && element2);
437 return element1->computedStyle() == element2->computedStyle(); 449 return element1->computedStyle() == element2->computedStyle();
438 } 450 }
439 451
440 bool Internals::isValidContentSelect(Element* insertionPoint, 452 bool Internals::isValidContentSelect(Element* insertionPoint,
441 ExceptionState& exceptionState) { 453 ExceptionState& exceptionState) {
442 ASSERT(insertionPoint); 454 ASSERT(insertionPoint);
443 if (!insertionPoint->isInsertionPoint()) { 455 if (!insertionPoint->isInsertionPoint()) {
444 exceptionState.throwDOMException(InvalidAccessError, 456 exceptionState.throwDOMException(InvalidAccessError,
(...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 return ClientRect::create(); 3019 return ClientRect::create();
3008 3020
3009 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 3021 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
3010 } 3022 }
3011 3023
3012 void Internals::crash() { 3024 void Internals::crash() {
3013 CHECK(false) << "Intentional crash"; 3025 CHECK(false) << "Intentional crash";
3014 } 3026 }
3015 3027
3016 } // namespace blink 3028 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698