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

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

Issue 900903002: DevTools: do not use Internals for inspector highlight tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comment addressed. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | 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) 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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes) 1462 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes)
1463 { 1463 {
1464 Vector<unsigned long> result; 1464 Vector<unsigned long> result;
1465 result.append(memoryCache()->minDeadCapacity()); 1465 result.append(memoryCache()->minDeadCapacity());
1466 result.append(memoryCache()->maxDeadCapacity()); 1466 result.append(memoryCache()->maxDeadCapacity());
1467 result.append(memoryCache()->capacity()); 1467 result.append(memoryCache()->capacity());
1468 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes); 1468 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes);
1469 return result; 1469 return result;
1470 } 1470 }
1471 1471
1472 String Internals::inspectorHighlightJSON(Node* node, ExceptionState& exceptionSt ate)
1473 {
1474 Page* page = contextDocument()->frame()->page();
1475 if (!page) {
1476 exceptionState.throwDOMException(InvalidAccessError, "No page can be obt ained from the current context document.");
1477 return String();
1478 }
1479 RefPtr<JSONObject> json(page->inspectorController().highlightJSONForNode(nod e));
1480 return json->toPrettyJSONString();
1481 }
1482
1483 bool Internals::hasGrammarMarker(Document* document, int from, int length) 1472 bool Internals::hasGrammarMarker(Document* document, int from, int length)
1484 { 1473 {
1485 ASSERT(document); 1474 ASSERT(document);
1486 if (!document->frame()) 1475 if (!document->frame())
1487 return 0; 1476 return 0;
1488 1477
1489 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length); 1478 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length);
1490 } 1479 }
1491 1480
1492 unsigned Internals::numberOfScrollableAreas(Document* document) 1481 unsigned Internals::numberOfScrollableAreas(Document* document)
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 { 2336 {
2348 ThreadState::current()->scheduleGC(); 2337 ThreadState::current()->scheduleGC();
2349 } 2338 }
2350 2339
2351 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc eptionState&) 2340 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc eptionState&)
2352 { 2341 {
2353 return new InternalsIterationSource(); 2342 return new InternalsIterationSource();
2354 } 2343 }
2355 2344
2356 } // namespace blink 2345 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698