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

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

Issue 2874073003: Add layout tests for ImageLoader::UpdateFromElement(kUpdateForcedReload) (Closed)
Patch Set: comment 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
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 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 String Internals::markerTextForListItem(Element* element) { 2774 String Internals::markerTextForListItem(Element* element) {
2775 DCHECK(element); 2775 DCHECK(element);
2776 return blink::MarkerTextForListItem(element); 2776 return blink::MarkerTextForListItem(element);
2777 } 2777 }
2778 2778
2779 String Internals::getImageSourceURL(Element* element) { 2779 String Internals::getImageSourceURL(Element* element) {
2780 DCHECK(element); 2780 DCHECK(element);
2781 return element->ImageSourceURL(); 2781 return element->ImageSourceURL();
2782 } 2782 }
2783 2783
2784 void Internals::forceImageReload(Element* element,
2785 ExceptionState& exception_state) {
2786 if (!element || !isHTMLImageElement(*element)) {
2787 exception_state.ThrowDOMException(
2788 kInvalidAccessError, "The element should be HTMLImageElement.");
2789 }
2790
2791 toHTMLImageElement(*element).ForceReload();
2792 }
2793
2784 String Internals::selectMenuListText(HTMLSelectElement* select) { 2794 String Internals::selectMenuListText(HTMLSelectElement* select) {
2785 DCHECK(select); 2795 DCHECK(select);
2786 LayoutObject* layout_object = select->GetLayoutObject(); 2796 LayoutObject* layout_object = select->GetLayoutObject();
2787 if (!layout_object || !layout_object->IsMenuList()) 2797 if (!layout_object || !layout_object->IsMenuList())
2788 return String(); 2798 return String();
2789 2799
2790 LayoutMenuListItem menu_list_item = 2800 LayoutMenuListItem menu_list_item =
2791 LayoutMenuListItem(ToLayoutMenuList(layout_object)); 2801 LayoutMenuListItem(ToLayoutMenuList(layout_object));
2792 return menu_list_item.GetText(); 2802 return menu_list_item.GetText();
2793 } 2803 }
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
3271 3281
3272 void Internals::crash() { 3282 void Internals::crash() {
3273 CHECK(false) << "Intentional crash"; 3283 CHECK(false) << "Intentional crash";
3274 } 3284 }
3275 3285
3276 void Internals::setIsLowEndDevice(bool is_low_end_device) { 3286 void Internals::setIsLowEndDevice(bool is_low_end_device) {
3277 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); 3287 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device);
3278 } 3288 }
3279 3289
3280 } // namespace blink 3290 } // 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