WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107461
[Qt] QtTestBrowser should provide option to enable/disable Javascript
https://bugs.webkit.org/show_bug.cgi?id=107461
Summary
[Qt] QtTestBrowser should provide option to enable/disable Javascript
Vivek Galatage
Reported
2013-01-21 10:40:19 PST
QtTestBrowser should provide option to enable/disable Javascript. Patch to follow.
Attachments
Patch
(3.04 KB, patch)
2013-01-21 10:44 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Patch
(3.04 KB, patch)
2013-01-21 21:53 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Patch
(2.95 KB, patch)
2013-02-07 04:14 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Vivek Galatage
Comment 1
2013-01-21 10:44:46 PST
Created
attachment 183804
[details]
Patch
Vivek Galatage
Comment 2
2013-01-21 21:53:25 PST
Created
attachment 183888
[details]
Patch
Noam Rosenthal
Comment 3
2013-01-21 23:33:31 PST
You can do this via web inspector; Do you really need this duplicated in the browser settings?
Vivek Galatage
Comment 4
2013-01-21 23:40:24 PST
(In reply to
comment #3
)
> You can do this via web inspector; Do you really need this duplicated in the browser settings?
yes I agree. But for a quick test for disabling it we need to open the inspector and then navigate it to the "Inspector settings" and then in the "General" tab to actually disable it. I thought for a test browser that would take a little longer hence introduced this quick menu item. Also one thing I am finding different is that on linux the inspector is not shown inside the QtTestBrowser whereas the same is shown on the mac.
Jocelyn Turcotte
Comment 5
2013-01-22 03:17:39 PST
(In reply to
comment #4
) It feels like you would be the only one using this menu. QtTestBrowser is more a WebKit developer tool then a web developer tool. Do you see a use case where other developers might want to use this menu?
Vivek Galatage
Comment 6
2013-01-22 03:23:25 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > It feels like you would be the only one using this menu. QtTestBrowser is more a WebKit developer tool then a web developer tool. > > Do you see a use case where other developers might want to use this menu?
I agree. The use case is something like: I am working on [1] and wanted a quick way to verify this bug. Hence I wanted it to quickly provide me an option to enable/disable the Javascript and hence prompted me in adding it to the QtTestBrowser. [1]
https://bugs.webkit.org/show_bug.cgi?id=103902
Vivek Galatage
Comment 7
2013-02-04 02:06:12 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > It feels like you would be the only one using this menu. QtTestBrowser is more a WebKit developer tool then a web developer tool. > > Do you see a use case where other developers might want to use this menu?
Another use case is that of browsers (almost all the browsers) providing the option to disable JavaScript execution altogether. So this menu would help simulate that behavior as well. In this case, the users usually disable the option via browser settings as such.
Jocelyn Turcotte
Comment 8
2013-02-07 03:28:25 PST
Comment on
attachment 183888
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=183888&action=review
> Tools/QtTestBrowser/launcherwindow.cpp:501 > + toggleJavaScriptEnabled->setChecked(true);
This should read: toggleJavaScriptEnabled->setChecked(settings->testAttribute(QWebSettings::JavascriptEnabled));
> Tools/QtTestBrowser/launcherwindow.cpp:933 > + statusBar()->showMessage(QString("Javascript ") + QString(enable ? "enabled" : "disabled"), 5000);
This isn't necessary, the checkbox already tells the user if JS is enabled or not.
Vivek Galatage
Comment 9
2013-02-07 04:13:20 PST
Comment on
attachment 183888
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=183888&action=review
Thank you for your feedback.
>> Tools/QtTestBrowser/launcherwindow.cpp:501 >> + toggleJavaScriptEnabled->setChecked(true); > > This should read: > toggleJavaScriptEnabled->setChecked(settings->testAttribute(QWebSettings::JavascriptEnabled));
Sure, I will correct this.
>> Tools/QtTestBrowser/launcherwindow.cpp:933 >> + statusBar()->showMessage(QString("Javascript ") + QString(enable ? "enabled" : "disabled"), 5000); > > This isn't necessary, the checkbox already tells the user if JS is enabled or not.
Agreed.
Vivek Galatage
Comment 10
2013-02-07 04:14:49 PST
Created
attachment 187057
[details]
Patch
WebKit Review Bot
Comment 11
2013-02-07 08:05:57 PST
Comment on
attachment 187057
[details]
Patch Clearing flags on attachment: 187057 Committed
r142125
: <
http://trac.webkit.org/changeset/142125
>
WebKit Review Bot
Comment 12
2013-02-07 08:06:02 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug