diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py
index 8e55cc0..d44a249 100644
--- a/IPython/core/tests/test_display.py
+++ b/IPython/core/tests/test_display.py
@@ -116,3 +116,19 @@ def test_set_matplotlib_formats_kwargs():
expected.update(cfg.print_figure_kwargs)
nt.assert_equal(cell, expected)
+def test_displayobject_repr():
+ h = display.HTML('
')
+ nt.assert_equal(repr(h), '')
+ h._show_mem_addr = True
+ nt.assert_equal(
+ repr(h), '' % hex(id(h)))
+ h._show_mem_addr = False
+ nt.assert_equal(repr(h), '')
+
+ j = display.Javascript('')
+ nt.assert_equal(repr(j), '')
+ j._show_mem_addr = True
+ nt.assert_equal(
+ repr(j), '' % hex(id(j)))
+ j._show_mem_addr = False
+ nt.assert_equal(repr(j), '')