Merge lp:~alecu/ubuntu-sso-client/fix-100-percent into lp:ubuntu-sso-client

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 610
Merged at revision: 610
Proposed branch: lp:~alecu/ubuntu-sso-client/fix-100-percent
Merge into: lp:ubuntu-sso-client
Diff against target: 28 lines (+7/-0)
2 files modified
ubuntu_sso/gui.py (+3/-0)
ubuntu_sso/tests/test_gui.py (+4/-0)
To merge this branch: bzr merge lp:~alecu/ubuntu-sso-client/fix-100-percent
Reviewer Review Type Date Requested Status
Rodrigo Moya (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+34326@code.launchpad.net

Commit message

Disabled support for plugins for the embedded webkit (LP: #617041)

Description of the change

Disabled support for plugins for the embedded webkit

To post a comment you must log in.
610. By Alejandro J. Cura

nicey nicey test-men

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Awesome! Awesome! CPU usage does not spike! YES!

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/gui.py'
2--- ubuntu_sso/gui.py 2010-09-01 14:17:01 +0000
3+++ ubuntu_sso/gui.py 2010-09-01 19:49:41 +0000
4@@ -913,6 +913,9 @@
5 def on_tc_browser_vbox_show(self, *args, **kwargs):
6 """The T&C page is being shown."""
7 browser = webkit.WebView()
8+ settings = browser.get_settings()
9+ settings.set_property("enable-plugins", False)
10+ settings.set_property("enable-default-context-menu", False)
11 browser.open(self.tc_uri)
12 browser.show()
13 self.tc_browser_window.add(browser)
14
15=== modified file 'ubuntu_sso/tests/test_gui.py'
16--- ubuntu_sso/tests/test_gui.py 2010-09-01 14:17:01 +0000
17+++ ubuntu_sso/tests/test_gui.py 2010-09-01 19:49:41 +0000
18@@ -876,6 +876,10 @@
19 self.assertIsInstance(browser, webkit.WebView)
20 self.assertTrue(browser.get_property('visible'))
21
22+ settings = browser.get_settings()
23+ self.assertFalse(settings.get_property('enable-plugins'))
24+ self.assertFalse(settings.get_property('enable-default-context-menu'))
25+
26 self.ui.tc_browser_vbox.hide()
27
28 def test_tc_browser_is_destroyed_when_tc_page_is_hid(self):

Subscribers

People subscribed via source and target branches