Skip to content

Instantly share code, notes, and snippets.

View vivekgalatage's full-sized avatar
👋
Hey!

Vivek Galatage vivekgalatage

👋
Hey!
View GitHub Profile
harness.js
==========
var initialize_InspectorTest = function() {
counter = 0;
InspectorTest.sendCommand = function(method, params, callback)
{
var parameters = [];
for (var name in params)
parameters.push("\"" + name + "\":" + "\"" + params[name] +"\"");
I: Install complete: 11 files copied
*** Checking out glib *** [8/19]
*** Configuring glib *** [8/19]
./autogen.sh --prefix /home/uma/workspace-android/WebKit/WebKitBuild/Dependencies/Root --libdir '/home/uma/workspace-android/WebKit/WebKitBuild/Dependencies/Root/lib64' --disable-dtrace --disable-static --disable-gtk-doc
*** No GTK-Doc found, please install it ***
*** Error during phase configure of glib: ########## Error running ./autogen.sh --prefix /home/uma/workspace-android/WebKit/WebKitBuild/Dependencies/Root --libdir '/home/uma/workspace-android/WebKit/WebKitBuild/Dependencies/Root/lib64' --disable-dtrace --disable-static --disable-gtk-doc *** [8/19]
*** module gdk-pixbuf not built due to non buildable glib *** [9/19]
*** module pango not built due to non buildable glib *** [10/19]
*** module gtk+ not built due to non buildable glib *** [11/19]
*** module gtk+ not built due to non buildable pango *** [11/19]
<html>
<head>
<script type="text/javascript" src="../../../../Source/WebCore/inspector/front-end/InspectorBackend.js"></script>
</head>
<body onLoad="InspectorBackend.loadFromJSONIfNeeded(); test();">
</body>
</html>
protocol-test.js
----------------
function runTest():
var url = scriptUrlBasePath + "/protocol-test.html";
var script = "(" + initialize_InspectorTest.toString() + ")();\n" + test.toString() + "";
var inspectorFrontend = window.internals.openDummyInspectorFrontend(url);
inspectorFrontend.postMessage(script, window.location.href);
protocol-test.html
@vivekgalatage
vivekgalatage / gist:4752724
Last active December 12, 2015 09:38
Notifying inspector front-end when the script execution state has been changed (due to browser wide "JavaScript" disable option).
diff --git a/Source/WebCore/inspector/Inspector.json b/Source/WebCore/inspector/Inspector.json
index 1414f64..b9575fb 100644
--- a/Source/WebCore/inspector/Inspector.json
+++ b/Source/WebCore/inspector/Inspector.json
@@ -559,6 +559,14 @@
"name": "javascriptDialogClosed",
"description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.",
"hidden": true
+ },
+ {
InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
if (injectedScript.hasNoValue()) {
result = TypeBuilder::Runtime::RemoteObject::create().setType(TypeBuilder::Runtime::RemoteObject::Type::Object);
return;
}
diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi
index fb69071..c05f4f3 100644
--- a/Source/WebCore/WebCore.gypi
+++ b/Source/WebCore/WebCore.gypi
@@ -5457,6 +5457,7 @@
'webinspector_audits_js_files': [
'inspector/front-end/AuditCategories.js',
+ 'inspector/front-end/AuditController.js',
'inspector/front-end/AuditFormatters.js',
InspectorHistory* InspectorDOMStorageAgent::findStorageHistory(ErrorString* errorString, const RefPtr<InspectorObject>& storageId, RefPtr<StorageArea>& storageArea, Frame*& targetFrame)
{
storageArea = findStorageArea(0, storageId, targetFrame);
if (!storageArea) {
*errorString = "Storage not found";
return 0;
}
String historyMapKey;
bool isLocalStorage = false;
@vivekgalatage
vivekgalatage / Singleton.cpp
Last active December 16, 2015 06:49
Singleton Template ass base class
template <class T>
class SingleTon
{
public:
static T& instance() {
static T inst;
return inst;
}
protected: